/*
 * Copyright 2023-2085 xujin <ceo@itgrail.com>
 *
 * Licensed under the Grail License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://itgrail.com/docs?id=3&catalogId=87
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.itgrail.pilot.infrastructure.tunnel.db.dataobject;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itgrail.grail.shiro.model.Account;

import java.sql.Timestamp;

import static com.baomidou.mybatisplus.annotation.IdType.AUTO;


@TableName("t_user")
public class UserDO implements Account {

    /**
     * 主键
     */
    @TableId(value = "id", type = AUTO)
    private Integer id;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * grailPilot平台的userId
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 钉钉userId
     */
    @TableField(value = "external_id")
    private String externalId;

    @TableField("email")
    private String email;

    @TableField("password")
    private String password;

    @TableField("status")
    private int status;
    /**
     * 工号
     */
    @TableField(value = "person_code")
    private String personCode;
    /**
     * 手机号
     */
    @TableField(value = "mobile")
    private String mobile;
    @TableField(value = "ding_url")
    private String dingUrl;

    @TableField(value = "identity_source_id")
    private String identitySourceId;

    @TableField(value = "identity_source")
    private String identitySource;

    /**
     * 部门id
     */
    @TableField(value = "dept_id")
    private String deptId;
    /**
     * 部门名称
     */
    @TableField(value = "dept_name")
    private String deptName;
    /**
     * 账号
     */
    @TableField(value = "account")
    private String account;
    @TableField(value = "parent_dept_id")
    private String parentDeptId;
    /**
     * 记录创建时间，默认当前时间
     */
    @TableField(value = "create_time")
    private Timestamp createTime;
    /**
     * 记录更新时间，默认当前时间
     */
    @TableField(value = "update_time")
    private Timestamp updateTime;
    /**
     * 是否删除 0 未删除 1 删除 默认是0
     */
    @TableField(value = "deleted")
    private Byte deleted;
    /**
     * 创建人
     */
    @TableField(value = "created")
    private String created;
    /**
     * 更新人
     */
    @TableField(value = "updated")
    private String updated;


    @Override
    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    @Override
    public String getPassword() {
        return password;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getExternalId() {
        return externalId;
    }

    public void setExternalId(String externalId) {
        this.externalId = externalId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getPersonCode() {
        return personCode;
    }

    public void setPersonCode(String personCode) {
        this.personCode = personCode;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getDingUrl() {
        return dingUrl;
    }

    public void setDingUrl(String dingUrl) {
        this.dingUrl = dingUrl;
    }

    public String getIdentitySourceId() {
        return identitySourceId;
    }

    public void setIdentitySourceId(String identitySourceId) {
        this.identitySourceId = identitySourceId;
    }

    public String getIdentitySource() {
        return identitySource;
    }

    public void setIdentitySource(String identitySource) {
        this.identitySource = identitySource;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getParentDeptId() {
        return parentDeptId;
    }

    public void setParentDeptId(String parentDeptId) {
        this.parentDeptId = parentDeptId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Byte getDeleted() {
        return deleted;
    }

    public void setDeleted(Byte deleted) {
        this.deleted = deleted;
    }

    public String getCreated() {
        return created;
    }

    public void setCreated(String created) {
        this.created = created;
    }

    public String getUpdated() {
        return updated;
    }

    public void setUpdated(String updated) {
        this.updated = updated;
    }
}
